package user;

import operation.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a1227
 * Date: 2022-10-04
 * Time: 17:03
 */
//用户端
public class Normal extends User{
    public Normal(String name) {
        this.name = name;
        this.iOperation = new IOperation[]{
                new ExitOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }

    //继承于抽象类，需重写抽象类的抽象方法
    @Override
    public int menu() {
        System.out.println("Hello " + name + "， Welcome to 用户端！");
        System.out.println("========用户端========");
        System.out.println("1.查阅书籍");
        System.out.println("2.借阅书籍");
        System.out.println("3.归还书籍");
        System.out.println("0.退出");
        System.out.println("=====================");
        System.out.println("请选择:>");
        int choice = scanner.nextInt();
        return choice;
    }
}
